//
//  JKDispatchTool.swift
//  JKWeibo
//
//  Created by albert on 16/5/16.
//  Copyright © 2016年 albert. All rights reserved.
//  延时执行工具

import UIKit

class JKDispatchTool: NSObject {
    
    /** 延时执行 */
    class func after(delay: NSTimeInterval, block: () -> Void){
        
        let delayTime = dispatch_time(DISPATCH_TIME_NOW, (Int64)(delay * Double(NSEC_PER_SEC)))
        
        dispatch_after(delayTime, dispatch_get_main_queue(), { () -> Void in
            block()
        })
    }
}
